﻿$(document).ready(function () {
    select(0);
    $("#B").click(function () {
        $("#B").addClass("current");
        $("#A").removeClass("current");
        select(1);
    });
    $("#A").click(function () {
        $("#A").addClass("current");
        $("#B").removeClass("current");
        select(0)
    });
});



function select(tj) {
    $.ajax({
        url: "/Ahome/Select?Id=" + tj,
        type: "Post",
        success: function (tq) {
            if (tq != null) {
                var Tj = "";
                var i = 0;
                for (; i < tq.length; i++) {
                    Tj += "<li class='ue-clear'>"
                        + "<span class='matter-time'>" + Format(tq[i].CompletionTime, 'yyyy-MM-dd hh:mm:ss').substr(5,5)+"</span>"
                        + "<a href = 'javascript:;' class='matter-title'> " + tq[i].TaskContent + "</a> "
                        + "</li>";
                }
                $("#Lb").html(Tj);
            }
            else {
                layer.msg('获取失败！', {
                    title: '提示框',
                    icon: 2,
                    time: 2000
                });
            }

        }
    });
}
